home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 January - Disc 2
/
Macworld (1999-01) (Disk 2).dmg
/
Serious Demos
/
Symbolic Composer 4.2
/
Environment
/
Projects
/
Examples
/
Demos
/
Endless
< prev
next >
Wrap
Lisp/Scheme
|
1998-10-26
|
3KB
|
106 lines
; by Peter Stone after JS.Bach SCOM-retranscription by Janusz Podrazik
; to analyze the score double-click high-lighted keywords
(def-orchestra 'orchestra
all-instr (piano bass clarinet)
)
(setq zones 32)
(defun make-velocity-zones (velpat vector)
(let (collect)
(dolist (x (vector-to-list vector))
(push (reposition-integer-list velpat x) collect))
(nreverse collect)))
(defun reposition-integer-list (pat pos)
(let ((gap (- pos (car pat))))
(mapcar #'(lambda (x) (+ x gap)) pat)))
(setq velocity-curve
(vector-round 34 64 (vector-resynthesize 3 (gen-noise-white zones 1 0.123) nil t)))
(setq velocity-lh
(make-velocity-zones '(0 -5 10) velocity-curve))
(setq velocity-rh1
(make-velocity-zones '(0) velocity-curve))
(setq velocity-rh2
(make-velocity-zones '(0 -5) velocity-curve))
(def-grammar 'mel
a (a b d)
b (d a)
d (b c a)
)
(def-section-timesheet sect-a
;
; zones and tonalities
;
with 1/1
; !---!---!---!---!---!---!---!---!
tonality "................" (fold-tonality 'b 4
(symbols-to-tonality
symbols (gen-trans b 2 'mel)
transpose '((0 2 4) (2 4 0) (4 0 2))
mapping (activate-tonality (harmonic-minor c 4))))
all-instr "----------------"
;
; rhythmics, melodies and velocities
;
beat 1/16 ; !---!---!---!---!
legato 90
piano " ------ ------" (match-beat '(a b c d b e c d c b)) with velocity-lh
bass " - - " (mapcar #'(lambda (x) (list x))
(gen-trans a 2 'mel)) with velocity-rh1
clarinet "- - " (mapcar #'(lambda (x) (list x))
(gen-trans b 2 'mel)) with velocity-rh2
)
(def-section sect-a
default
tempo-zones (gen-repeat 16 '(1/1))
tempo (vector-to-list
(vector-scale 61 58
(vector-resynthesize 2
(gen-noise-white zones 1 0.123) nil t)))
piano
channel 1
bass
channel 2
clarinet
channel 3
)
(clone-section sect-a sect-b)
(def-section-timesheet sect-b
;
; zones and tonalities
;
with 1/1
; !---!---!---!---!---!---!---!---!
tonality "................" (fold-tonality 'b 4
(symbols-to-tonality
symbols (reverse (gen-trans b 2 'mel))
transpose '((0 2 4) (2 4 0) (4 0 2))
mapping (activate-tonality (pentatonic c 4))))
all-instr "----------------"
;
; rhythmics, melodies and velocities
;
beat 1/16 ; !---!---!---!---!
legato 90
piano " ------ ------" (match-beat '(a b c d b e c d c b)) with velocity-lh
bass " - - " (mapcar #'(lambda (x) (list x))
(gen-trans a 2 'mel)) with velocity-rh1
clarinet "- - " (mapcar #'(lambda (x) (list x))
(gen-trans b 2 'mel)) with velocity-rh2
)
(play-file-p "Endless midi"
all-instr '(sect-a sect-b)
)